<template>
  <div class="goods">
    <div class="top">
      <div style="display:flex;align-items: center;width: 30%;">
        <span style="width:60px;">商品名:</span>
        <el-input v-model="input" placeholder="请输入内容" size="small"></el-input>
      </div>
      <div class="shifousjia">
        <span>是否上架:&nbsp;&nbsp;</span>
        <div class="list">
          <div class="p1">
            <p>未上架</p>
          </div>
          <div class="p2">
            <p>已上架</p>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import Bus from '@/components/eventBus.js'
export default {
  name: 'goods',
  data() {
    return {
      input: ''
    }
  },
  mounted() {
    //一开始加载路由就传送相应的值给leftmenu页面
    Bus.$emit('show', 3)
    Bus.$emit('name', this.$route.meta.name)
  }
}
</script>

<style lang="less" scoped>
.goods {
  padding: 20px;
  .top {
    background-color: #fff;
    padding: 20px;
    display: flex;
    align-items: center;
    .shifousjia {
      margin-left: 30px;
      display: flex;
      align-items: center;
      .list {
        width: 100px;
        height: 30px;
        border: 1px solid #c2c1c1;
        display: flex;
        align-items: center;
        .p1 {
          width: 50%;
          display: flex;
          align-items: center;
          justify-content: center;
          border-right: 1px solid #c2c1c1;
          p:hover {
            color: #0a88fe;
            cursor: pointer;
          }
        }
        .p2 {
          width: 50%;
          display: flex;
          align-items: center;
          justify-content: center;
          p:hover {
            color: #0a88fe;
            cursor: pointer;
          }
        }
      }
    }
  }
}
</style>